package com.spiro.normal.bio;

import com.spiro.common.BaseJavaServer;
import org.apache.thrift.server.TServer;
import org.apache.thrift.server.TSimpleServer;
import org.apache.thrift.transport.TServerSocket;
import org.apache.thrift.transport.TServerTransport;

public class BioServer extends BaseJavaServer {

    public BioServer(int port) {
        super(port);
    }

    @Override
    public void serve() {
        try {
            TServerTransport serverTransport = new TServerSocket(this.port);
            TServer server = new TSimpleServer(new TServer.Args(serverTransport).processor(processor));

            System.out.println("Starting the simple bio server...");
            server.serve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
